#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int my_strlen1(char* arr)
{
	if (*arr != '\0')
		return 1 + my_strlen1(arr + 1);
	else
		return 0;
}
int my_strlen2(char* arr)
{
	int n = 0;
	while (*arr != '\0')
	{
		n++;
		arr = arr + 1;
	}
	return n;
}
int main()
{
	int n = 0, m = 0;
	char arr[30] = {0};
	scanf("%s", arr);
	n = my_strlen1(arr);
	printf("%d\n", n);
	m = my_strlen2(arr);
	printf("%d\n", m);
	return 0;
}